import request from '@/utils/request'



export function getDoc(params) {
  return request({
    url: '/cherry/',
    method: 'post',
    data: {
        fun: 'sys.doc',
        client: 'local',
        tgt: '*'
    }
  })
}

export function getJob(params) {
  return request({
    url: '/cherry/jobs/'+params,
    method: 'get',
  })
}

export function getStats(params) {
    return request({
      url: '/cherry/stats/',
      method: 'get',
      params
    })
}

export function execRun(params) {
    return request({
      url: '/cherry/run/',
      method: 'post',
      data: {
          client: 'local',
          fun: 'test.ping',
          tgt: '*'
      }
    })
}
export function execFunc(params) {
    console.log(params)
    return request({
      url: '/cherry/',
      method: 'post',
      data: params
    })
}
// 获取 job 信息
export function getJobs(params) {
    return request({
      url: '/cherry/jobs/',
      method: 'get',
    })
}